﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>My MVC Application</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <div id="menucontainer">
                @{ var modules = ViewData["AccessibleMenus"] as IList<byte>;
                   if (modules == null) {modules = new List<byte>();} }
                <ul id="menu">
                    @if (modules.Contains((byte)WebPlatform.Core.Modules.Administration))
                        { 
                            <li>@Html.ActionLink("Administration", "Index", "Administration")</li>
                        }
                    @if (modules.Contains((byte)WebPlatform.Core.Modules.Product))
                        {
                            <li>@Html.ActionLink("Products", "Index", "Product")</li>
                        }
                    @if (modules.Contains((byte)WebPlatform.Core.Modules.Orders))
                        {
                            <li>@Html.ActionLink("Orders", "Index", "Order")</li>
                        }
                </ul>
            </div>
        </div>
        <div id="main">
            @RenderBody()
        </div>
        <div id="footer">
        </div>
    </div>
</body>
</html>
